CC = gcc
CPP=g++
BASE_PATH=./lib
CFLAGS = -Wall -I ./include/ 
LIB= -lpthread -lrt -L$(BASE_PATH) -lmxml  -Wl,-rpath=$(BASE_PATH)
TAG =app

all +=src/main.o


export CC
$(TAG): $(all)
	$(CPP) $(CFLAGS) -o $(TAG) $(all) $(LIB)
	$(RM) -f *.gch *.bak $(all) 
	
%.o:%.c
	$(CC) $(CFLAGS) -c -o $@ $<
%.o:%.cpp
	$(CPP) $(CFLAGS) -c -o $@ $<

.PHONY: clean
clean:
	rm -f $(TAG) $(all) 
